﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace Himp.TaskScheduling
{
    /// <summary>
    /// 标准化验任务
    /// </summary>
    public class StandardTestTask : Entity<long>
    {
        /// <summary>
        /// 制样码
        /// </summary>
        public string SampleCode { get; set; }

        /// <summary>
        /// 化验码
        /// </summary>
        public string TestCode { get; set; }

        /// <summary>
        /// 瓶底码
        /// </summary>
        public string BottomCode { get; set; }

        /// <summary>
        /// 煤样类型
        /// </summary>
        public string Sampletype { get; set; }

        /// <summary>
        /// 任务类别
        /// </summary>
        public EnumTaskType TaskType { get; set; }

        /// <summary>
        /// 制样方式
        /// 手工
        /// 自动
        /// </summary>
        public string SampeWay { get; set; }

        /// <summary>
        /// 测定次数
        /// </summary>
        public int TestCnt { get; set; }

        /// <summary>
        /// 任务下达时间
        /// </summary>
        public DateTime TaskAssgnTime { get; set; }

        /// <summary>
        /// 最后操作时间
        /// </summary>
        public DateTime LastOperTime { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string? Auditor { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? AuditTime { get; set; }

        /// <summary>
        /// 任务状态
        /// </summary>
        public string ExecStas { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="auditor"></param>
        public void SetAduit(string auditor)
        { 
            Auditor = auditor;
            AuditTime = DateTime.Now;
            ExecStas = "就绪";
        }
    }
}
